Chaotic trajectories

This notebook shows the trajectories of the 3-species model for polygenic adaptation-based coevolution. Please, open in Google Colab!

Open In Colab

Code
%%capture
!git clone https://github.com/porygon-tech/ECO
!pip3 install pickle5
!pip3 install plotly
Code
import plotly.express as px

from os import chdir, listdir
from pathlib import Path
import pickle5
import bz2
chdir('/home/roman/LAB/ECO/')
root = Path(".")
obj_path = root / 'data/obj'
Code
listdir(obj_path / 'trajectories' );

Plots

Code
#import numpy as np
#filename=np.random.choice(listdir(obj_path / 'trajectories' )); print('imported ' + filename)
filename='trajectory_alpha0.04_a5_t8000.obj'
with bz2.BZ2File(obj_path / 'trajectories' / filename, 'rb') as f:
    dataset_temp = pickle5.load(f)

fig = px.line_3d(x=dataset_temp[0],y=dataset_temp[1],z=dataset_temp[2])
fig.update_traces(line=dict(width=0.8))
fig.show()
Code
filename='trajectory_alpha0.04_a4.9_t4000.obj'
with bz2.BZ2File(obj_path / 'trajectories' / filename, 'rb') as f:
    dataset_temp = pickle5.load(f)

fig = px.line_3d(x=dataset_temp[0],y=dataset_temp[1],z=dataset_temp[2])
fig.update_traces(line=dict(width=0.8))
fig.show()